package com.ruoyi.business.dto;

import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Inventory对象 Inventory
 *
 * @author liutietou
 * @since 1.0 2025-06-22
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "inventorydto") // 关联到数据库视图
public class InventoryDto extends BaseEntity {

    private static final long serialVersionUID = 17852222233L;

    // 主键字段
    @Id
    @Column(name = "cinvcode")
    private String cinvcode;

    // 从 Inventory 继承的字段
    @Column(name = "cinvname")
    private String cinvname;
    
    @Column(name = "cinvstd")
    private String cinvstd;
    
    @Column(name = "cinvccode")
    private String cinvccode;
    
    @Column(name = "ccomunitcode")
    private String ccomunitcode;
    
    @Column(name = "itaxrate")
    private BigDecimal itaxrate;

    // 额外的字段
    @Column(name = "order_num")
    private BigDecimal orderNum ;
    
    @Column(name = "comunitname")
    private String comunitname;
    
    @Column(name = "saleprice")
    private BigDecimal saleprice;
    
    @Column(name = "rate")
    private BigDecimal rate;
    
    @Column(name = "num")
    private BigDecimal num;

    public InventoryDto(String cinvcode) {
        this.cinvcode = cinvcode;
    }
}
